// src/main/java/com/mcp_life/mcp_life/common/util/UserContextHolder.java
package com.mcp_life.common.context;

public class UserContextHolder {

    private static final ThreadLocal<String> userIdThreadLocal = new ThreadLocal<>();

    public static void setUserId(String userId) {
        userIdThreadLocal.set(userId);
    }

    public static String getUserId() {
        return userIdThreadLocal.get();
    }

    public static void remove() {
        userIdThreadLocal.remove();
    }
}
